/* 消息容器 */
.agent-message {
  align-self: flex-start;
  max-width: 80%;
  min-width: 330px;
  margin: 4px 0;
  background: #fff;
  border-radius: 12px 12px 12px 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0; /* 防止消息被压缩 */
}

/* 状态指示器 */
.agent-message .status-indicator {
  padding: 4px 12px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  flex-shrink: 0;
}

/* 消息内容区域 */
.agent-message .message-content {
  overflow-y: auto;
  padding: 12px;
  flex: 1;
  min-height: 0; /* 确保flex子元素可以正确滚动 */
}

/* 滚动条样式 */
.agent-message .message-content::-webkit-scrollbar {
  width: 6px;
}

.agent-message .message-content::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.agent-message .message-content::-webkit-scrollbar-track {
  background: transparent;
}

/* 状态样式 */
.agent-message .status-indicator.cancelled {
  background: #f5f5f5;
  color: #999;
}

/* 取消按钮样式 */
.agent-message .status-indicator .cancel-button {
  margin-left: auto;
  padding: 0 4px;
  height: 24px;
  color: #999;
}

.agent-message .status-indicator .cancel-button:hover {
  color: #ff4d4f;
}

.agent-message .status-indicator.thinking,
.agent-message .status-indicator.executing,
.agent-message .status-indicator.analyzing {
  background: #e6f7ff;
  color: #1890ff;
}

.agent-message .status-indicator.waiting {
  background: #fffbe6;
  color: #faad14;
}

.agent-message .status-indicator.completed {
  background: #f6ffed;
  color: #52c41a;
}

.agent-message .status-indicator.error {
  background: #fff1f0;
  color: #ff4d4f;
}

/* 内容块样式 */
.agent-message .content-item {
  padding: 5px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
  margin-bottom: 12px;
  width: 100%;
}

.agent-message .content-item:last-child {
  margin-bottom: 0;
}

/* 命令块样式 */
.agent-message .command-block {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  margin-top: 12px;
  width: 100%;
  border: 1px solid #f0f0f0;
}

/* 命令文本容器 */
.agent-message .command-block .command-text-container {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin: 8px 0;
  width: 100%;
}

/* 命令文本输入框 */
.agent-message .command-block .command-text-input {
  flex: 1;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 14px;
  background-color: #f5f5f5;
  border-radius: 4px;
  padding: 8px !important;
  resize: none;
}

/* 命令操作区域 */
.agent-message .command-block .command-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

/* 执行状态 */
.agent-message .command-block .executing-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1890ff;
}

/* 复制按钮 */
.agent-message .command-block .copy-button {
  position: absolute;
  right: 4px;
  top: 4px;
  padding: 4px 8px;
  height: 28px;
  background: #f0f0f0;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  color: rgba(0, 0, 0, 0.65);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.agent-message .command-block .copy-button:hover {
  background: #e6f7ff;
  border-color: #1890ff;
  color: #1890ff;
}

.agent-message .command-block .copy-button:active {
  background: #bae7ff;
} 